Repository navigation
Add rust - #17
Merged
Merged
Add rust#17
Conversation
geodro
approved these changes
Nov 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Plugin
What it does
Lerd's host proxy already serves a Rust app with
cargo run, but it never rebuilds on save, and a compile error takes the site down. This plugin makeslerd rust:devthe site's dev command. It builds each change while the running app keeps serving, and swaps to the newly built program only when the build succeeds. A failed build leaves the previous one serving and says so in the Dev Server log, on a Rust tab and, if the user allows it, in a notification. It also warns when the app runs but nothing answers on the HOST and PORT Lerd proxies to, which is the usual reason a Rust app is unreachable behind the proxy.It follows up on Lerd's invitation on X to bring this Rust workflow to Lerd as a plugin. The companion fix for Lerd itself, putting cargo and version-manager toolchains on the dev server PATH, is lerd-env/lerd#2496.
What it adds to Lerd
lerd rust:dev(the dev command),lerd rust:setup(setsproxy.commandin.lerd.yaml, after showing the change and asking),lerd rust:status.confirm: true, since it changes files).rust_statusandrust_check(timeout 10m), plusSKILL.md.status(GET, reads only),project(GET,loopback_only, runscargo metadata),check(POST,loopback_only, runscargo check, timeout 10m).providesjobs.What it reads, changes and sends
cargo metadata --no-deps --offline; the sizes and modification times of the project's files, to notice saves;.lerd.yaml; Lerd's/api/sites, to find a worktree's path by branch and to pick a free port for a new.lerd.yaml. It never reads the contents of.env(a change to it restarts the app) or any file outside the site..lerd.yaml, only throughlerd rust:setupafter a yes or--yes, and only itsproxy.commandline, or a new file when there is none. Lerd's own consent gate still applies at the nextlerd link.Cargo fmtformats the code after the site command's confirmation. Each dev server's last build is kept as a small JSON file in the plugin's data folder. Running cargo writes the project'starget/as it always does.$LERD_API_URL. Cargo itself may download dependencies when it builds, as it does in any terminal.Requirements
lerd: ">=1.38",platforms: [linux]; WSL covers Windows. macOS is untested, so it is not listed yet.python3is read from the shebangs and nothing else is required.cargois deliberately not underrequires. The dashboard service and dev server units run with a fixed PATH without~/.cargo/bin, where rustup's installer puts cargo, so Lerd would mark the plugin broken for most rustup users. The scripts find cargo themselves on PATH, in$CARGO_HOME/binand in~/.cargo/bin, or atLERD_RUST_CARGO, and fail with a clear message when it is missing. fix: find rustup, version manager and go.dev toolchains for host dev servers lerd#2496 closes the same gap for dev servers.Images
Checklist
plugin.yamldeclareslerdas a lower bound, andplatformsif it runs on only one..envonly when the README says why.plugin.yamland only tell the user something they need to know or act on.latest, and is named in the README with its source. (It ships no services.)How it was checked
lerd rust:setupandlerd link, then edited, broken and fixed. The previous build kept serving, and nothing was left running after restart, pause and unlink.lerd mcp. Hostile input (paths with../, quotes, markup and$(...)as site, branch and package) only produced errors, ran nothing and wrote nothing outside the plugin's folders.ui/.Category: none of the existing categories (AI, Migration, Services) fits language support, so this proposes Languages. Happy to use another one.
Created with Claude Opus 5.5 in Claude Code (desktop app); an independent review pass ran on the same model.